import {HttpClient} from "@angular/common/http";
import {Injectable} from "@angular/core";
import {AppUrl, TIME_OUT} from "../../../../app/app.general";
import {Observable} from "rxjs/Observable";

@Injectable()
export class FoodHomeService {
  constructor(private http: HttpClient) {

  }

  getRestaurant(body: any): Observable<any> {
    return this.http.post(AppUrl.restaurant.getRestaurant, body).timeout(TIME_OUT);
  }

  getOrder(body: any): Observable<any> {
    return this.http.post(AppUrl.food.foodorder, body).timeout(TIME_OUT);
  }

  addFoods(body: any): Observable<any> {
    return this.http.post(AppUrl.food.addFoods, body).timeout(TIME_OUT);
  }
}
